//店铺营业状态
export const OPEN_STATE = {
  ON: 0,
  OFF: 1,
  CLOSE: 2,
  REST: 3,
};
export const OPEN_STATE_TEXT = {
  [OPEN_STATE.ON]: "营业中",
  [OPEN_STATE.OFF]: "关闭",
  [OPEN_STATE.CLOSE]: "打烊",
  [OPEN_STATE.REST]: "休息中",
};

export const OPEN_STATE_CLEW_TEXT = {
  [OPEN_STATE.ON]: "营业中",
  [OPEN_STATE.OFF]: "当前门店已关闭",
  [OPEN_STATE.CLOSE]: "当前门店休息中",
  [OPEN_STATE.REST]: "暂无排期，不可预约~",
};

export const SHOP_STATE = {
  ON: 0,
  OFF: 1,
  CLOSE: 2,
  REST: 3,
};
export const SHOP_STATE_TEXT = {
  [SHOP_STATE.ON]: "正常营业",
  [SHOP_STATE.OFF]: "已关停",
  [SHOP_STATE.CLOSE]: "已打烊",
  [SHOP_STATE.REST]: "休息中",
};

//预约时间日期状态
export const RE_DATE_STATE = {
  AVAILABLE: 1,
  FULL: 2,
  DISABLED: 3,
};
export const RE_DATE_STATE_TEXT = {
  [RE_DATE_STATE.AVAILABLE]: "可约",
  [RE_DATE_STATE.FULL]: "约满",
  [RE_DATE_STATE.DISABLED]: "不可约",
};

export const PROJECT_TYPE = 0;
export const RESOURCES_TYPE = 1;

export const PROJECT_STATE = {
  label: "项目",
  value: PROJECT_TYPE,
};
export const RESOURCES_STATE = {
  label: "资源",
  value: RESOURCES_TYPE,
};

//预约支付方式，与微信支付和零钱支付不一样
export const RESERVATION_PAY_TYPE = {
  ON_LINE: 2,
  SHOP_PAY: 1,
};
export const RESERVATION_PAY_TYPE_TEXT = {
  [RESERVATION_PAY_TYPE.ON_LINE]: "在线支付",
  [RESERVATION_PAY_TYPE.SHOP_PAY]: "到店支付",
};

export const RESERVATION_ORDER_STATE = {
  WAIT_SERVICE: 2,
  CLOSE: 4,
  WAIT_PAY: 1,
  FINISH: 3,
  CANCEL: 5,
};

export const RESERVATION_ORDER_STATE_TEXT = {
  [RESERVATION_ORDER_STATE.WAIT_SERVICE]: "待服务",
  [RESERVATION_ORDER_STATE.CLOSE]: "已关闭",
  [RESERVATION_ORDER_STATE.WAIT_PAY]: "待支付",
  [RESERVATION_ORDER_STATE.FINISH]: "已完成",
  [RESERVATION_ORDER_STATE.CANCEL]: "已取消",
};

export const RESERVATION_PAY_TYPE_LIST = [
  {
    label: RESERVATION_PAY_TYPE_TEXT[RESERVATION_PAY_TYPE.ON_LINE],
    value: RESERVATION_PAY_TYPE.ON_LINE,
  },
  {
    label: RESERVATION_PAY_TYPE_TEXT[RESERVATION_PAY_TYPE.SHOP_PAY],
    value: RESERVATION_PAY_TYPE.SHOP_PAY,
  },
];

export const ORDER_TYPE = {
  // 收银台收款
  CASHIER: 1,
  // 会员卡充值
  CARD_RECHARGE: 2,
  OPEN_CARD_RECHARGE: 3,
  OPEN_CARD_PAY: 4,
  MALL: 5,
  WCANYIN: 6,
  BOOKING: 7,
  JUNBO: 8,
  GIVE_CARD: 9,
  MEMBER_RENEW: 10,
  SCHOOL_PAY: 11,
  SCAN_CODE_PAY: 12,
  MALL_PRESELL: 13,
  CODE_PAYMENT: 14,
  PASSIVE_PAY: 15,
  RAKE_BACK: 16,
  APPOINTMENT: 17,
};
export const ORDER_TYPE_TEXT = {
  [ORDER_TYPE.CASHIER]: "收银台收款",
  [ORDER_TYPE.CARD_RECHARGE]: "会员卡充值",
  [ORDER_TYPE.OPEN_CARD_RECHARGE]: "预存开卡",
  [ORDER_TYPE.OPEN_CARD_PAY]: "付费开卡",
  [ORDER_TYPE.MALL]: "微商城",
  [ORDER_TYPE.WCANYIN]: "微餐饮",
  [ORDER_TYPE.BOOKING]: "预订",
  [ORDER_TYPE.JUNBO]: "军博游乐",
  [ORDER_TYPE.GIVE_CARD]: "赠送会员",
  [ORDER_TYPE.MEMBER_RENEW]: "会员续费",
  [ORDER_TYPE.SCHOOL_PAY]: "校园充值",
  [ORDER_TYPE.SCAN_CODE_PAY]: "固码付",
  [ORDER_TYPE.MALL_PRESELL]: "定金预售",
  [ORDER_TYPE.CODE_PAYMENT]: "码牌支付",
  [ORDER_TYPE.PASSIVE_PAY]: "收款",
  [ORDER_TYPE.RAKE_BACK]: "插件返佣",
  [ORDER_TYPE.APPOINTMENT]: "预约",
};

export const DISCOUNT_TYPE = {
  POINTS: 0,
  CARD: 1,
  COUPON: 2,
  MEMBER: 3,
  CAMPAIGNS: 4,
  Custom: 5,
  COMBINE_DISCOUNT: 6,
  SUPERMEMBER: 8,
  SUPERMEMBER_POINTS: 9,
};
export const DISCOUNT_TYPE_TEXT = {
  [DISCOUNT_TYPE.POINTS]: "积分",
  [DISCOUNT_TYPE.CARD]: "卡",
  [DISCOUNT_TYPE.COUPON]: "券",
  [DISCOUNT_TYPE.MEMBER]: "会员",
  [DISCOUNT_TYPE.CAMPAIGNS]: "活动",
  [DISCOUNT_TYPE.Custom]: "自定义优惠",
  [DISCOUNT_TYPE.COMBINE_DISCOUNT]: "组合优惠",
  [DISCOUNT_TYPE.SUPERMEMBER]: "超级会员",
  [DISCOUNT_TYPE.SUPERMEMBER_POINTS]: "超级会员积分",
};
//支付状态 `payment_status` int(11) NOT NULL DEFAULT '0' COMMENT
//'支付状态  101- - - - - - - - - - - -'

export const PAYMENT_STATUS = {
  PAY_SUCCESS: 100, //支付成功
  WAIT_PAY: 101, //待支付
  PAY_ING: 102, //支付中
  FAIL: 104, //支付失败
  ACTIVE_CANCELLATION: 105, //主动取消
  RETURN_SUCCESS: 200, //退款成功
  RETURN_ING: 201, //退款中
  RETURN_FAIL: 202, //退款失败
  RETURN_PART: 205, //部分退款
  WAIT_SETTLEMENT: 300, //待结算
  SETTLEMENT_ING: 301, //结算中
  SETTLEMENT_SUCCESS: 302, //结算成功
  SETTLEMENT_FAIL: 303, //结算失败
};
export const PAYMENT_STATUS_TEXT = {
  [PAYMENT_STATUS.PAY_SUCCESS]: "支付成功",
  [PAYMENT_STATUS.WAIT_PAY]: "待支付",
  [PAYMENT_STATUS.PAY_ING]: "支付中",
  [PAYMENT_STATUS.FAIL]: "支付失败",
  [PAYMENT_STATUS.ACTIVE_CANCELLATION]: "主动取消",
  [PAYMENT_STATUS.RETURN_SUCCESS]: "退款成功",
  [PAYMENT_STATUS.RETURN_ING]: "退款中",
  [PAYMENT_STATUS.RETURN_FAIL]: "退款失败",
  [PAYMENT_STATUS.RETURN_PART]: "部分退款",
  [PAYMENT_STATUS.WAIT_SETTLEMENT]: "待结算",
  [PAYMENT_STATUS.SETTLEMENT_ING]: "结算中",
  [PAYMENT_STATUS.SETTLEMENT_SUCCESS]: "结算成功",
  [PAYMENT_STATUS.SETTLEMENT_FAIL]: "结算失败",
};

export const ORDER_SUB_STATUS = {
  OVER_TIME: 4,
};

export const SHARE_PATH = "sp-reservation/pages/project_detail/main";
